<?php

use yii\db\Migration;

/**
 * Class m190221_073102_add_cloumn_on_complaints
 */
class m190221_073102_add_cloumn_on_complaints extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->addColumn('complaints', 'status', $this->tinyInteger(3));
        $this->addCommentOnColumn('complaints', 'status', '状态');
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        $this->dropColumn('complaints', 'status');

        return false;
    }

    /*
    // Use up()/down() to run migration code without a transaction.
    public function up()
    {

    }

    public function down()
    {
        echo "m190221_073102_add_cloumn_on_complaints cannot be reverted.\n";

        return false;
    }
    */
}
